<?php

declare ( strict_types = 1 );

namespace App\Common\Model\WebDebugLog\TemplateTrait;

use App\Common as com;
use App\Common\Model\WebDebugLog\TemplateTrait as thisTemplateTrait;
use App\Common\Model\WebDebugLog\DataUnit as nameDataUnit;
use App\Common\Model\Base as nameModelBase;

trait DataUnit {

	use thisTemplateTrait\_AutoBuild\DataUnit;

	/**
	 * 初始化DataUnit（自动调用）
	 * @return void
	 */
	protected function _initTraitDataUnit():void {
		// $this->_dataOperate_Data['XXX'] = 'XXX';
	}

	/**
	 * goData_Id
	 * @return nameModelBase\DataUnit\DataOperate
	 */
	/*
	public function goData_Id( ):nameModelBase\DataUnit\DataOperate {
		   return $this->_dataOperate( 'id', function(){
			   return com\Lib\Fun\Str::randString( 10 );
		   } );
	}
	*/

	/**
	 * goData_Id
	 * @return nameDataUnit\DataOperate\Id
	 */
	/*
	public function goData_Id( ):nameDataUnit\DataOperate\Id {
		   $res = $this->_dataOperate( 'id', function(){
			   return com\Lib\Fun\Str::randString( 10 );
		   }, nameDataUnit\DataOperate\Id::class );
		   //
		   if( $res instanceof nameDataUnit\DataOperate\Id ){
			   return $res;
		   }
	}
	*/

	/**
	 * 快捷join
	 * @param \Closure $newLaterCallBack 创建后的回调 $fn( $newItem )
	 * @return nameDataUnit\JoinModel\Other
	 */
	/*
	public function joinOther( \Closure $newLaterCallBack = null ):nameDataUnit\JoinModel\Other {
		return $this->goJoinModel()->goOther( $newLaterCallBack );
	}
	*/

}
